package com.spzx.product.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.spzx.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(description = "商品分类")
public class Category extends BaseEntity {
    @Schema(description = "分类名称")
    private String name;
    @Schema(description = "分类图标")
    private String imageUrl;
    @Schema(description = "分类父id")
    private Long parentId;
    @Schema(description = "分类状态： 0不展示 1展示")
    private Integer status;
    @Schema(description = "分类排序")
    private Integer orderNum;

    //下面代码方便前端解析
    @TableField(exist = false)//字段是扩展字段
    @Schema(description = "是否有下一级分类： true存在 false不存在")
    private boolean hasChildren = false;
}
